FROM registry.k8s.cloud/library/python:3.8.7-alpine

WORKDIR /scripts

COPY requirements.txt /scripts

RUN pip install -r requirements.txt -i https://pypi.intra.knownsec.com/testuser/dev --trusted-host pypi.intra.knownsec.com
RUN sed -i s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g /etc/apk/repositories
RUN apk update && apk add ca-certificates && update-ca-certificates && apk add --update tzdata \
&& rm -rf /var/cache/apk/*

ENV TZ=Asia/Shanghai

COPY sources /scripts

RUN crontab crontab.conf

CMD crond -f
